redesign(composer): neutral desktop plus-menu popover with in-place mode picker#478
Merged
Merged
Conversation
…ode picker The >=1024px "+" popover header crushed its subtitle to an ellipsis (grid reserved 216px for the mode pill inside a 22rem surface) and still carried the legacy teal-gradient styling. Rebuild it to the Sheet header anatomy the mobile sheet already uses: accent icon tile, mode title as the switcher trigger, and the subtitle on its own full-width line so it can never truncate. - swap the layered mode dropdown for an in-place body swap; the old dropdown was clipped by the panel overflow when the current mode had few action rows, leaving below-fold modes unclickable - single anchor caret centred on the trigger via --mode-action-caret-left (removes the duplicate JSX carets); widen the popover 22rem -> 24rem - drop the gradient header CSS and the unreachable <=430px mode-action rules (the popover only renders >=1024px; smaller viewports use the Sheet) - keep renderPopoverBody in statement form: react-hooks/refs flags ref writes inside render helpers invoked from conditional JSX expressions Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…enu-design-1a4bb2
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Contributor
📝 WalkthroughWalkthroughThe mode-action popover now calculates caret placement from the trigger position, exposes it through a CSS variable, renders an in-place mode list, and simplifies related desktop and responsive styles. ChangesMode action popover
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Trigger
participant ModeActionPopup
participant IntegratedSurface
Trigger->>ModeActionPopup: provide bounding rectangle
ModeActionPopup->>ModeActionPopup: calculate caretLeft
ModeActionPopup->>IntegratedSurface: set --mode-action-caret-left
IntegratedSurface->>IntegratedSurface: position caret pseudo-element
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (10 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
toolbarButtonclose.renderPopoverBody). The old dropdown was clipped by the panel'soverflow-hiddenwhenever the current mode had few action rows (e.g. Forms), leaving below-fold mode options unclickable.--mode-action-caret-left(removes the duplicate JSX carets); popover widened 22rem → 24rem; deleted the teal-gradient header CSS and the unreachable ≤430px.mode-action-*rules (net −179 lines).Open <mode> optionstrigger,daily-actions-menurole/menu structure, menuitem names ("Scope", "Upload PDF", "View evidence"),menuitemradiomode options, Escape/focus-restore behavior.Verification
npm run verify:pr-local— blocked at itsformat:checkstep by a pre-existing local checkout artifact:prettier --checkfails onCLAUDE.md+.claude/settings.json, which are byte-identical to origin/main (verified viagit diff origin/main) and untouched by this PR. The two files this PR changes pass prettier. Constituent gates run individually below.npm run verify:cheap— green post-merge with origin/main (runtime, actions-pins, sitemap, lint, typecheck, vitest 1476 passed / 1 skipped)npm run verify:ui— full Chromium run green pre-merge (119 passed; 5 cold-compile navigation timeouts on routes untouched by this diff, all 5 pass on targeted re-run). Post-merge, re-ran the popover-relevant specs green:ui-smoke:1078(desktop mode options close on outside click / scope open),ui-smoke:1119(@critical demo answer flow),ui-accessibilityreduced-motion + forced-colors (both drive the "+" menu → Scope).npm run verify:release— not run (not a release/handoff claim)npm run eval:retrieval:quality— N/A (no retrieval/ranking/selection/chunking/scoring change)npm run eval:rag -- --limit 15— N/A (no answer generation/synthesis/post-processing change)npm run check:production-readiness— N/A (no clinical workflow/privacy/env/Supabase/source-governance change)npm run check:deployment-readiness— N/A (no deployment change)Additional targeted QA (Playwright script, 1280×800): opened the "+" menu in all 8 modes and asserted zero clipped header/subtitle/row text (
scrollWidth ≤ clientWidth), light + dark schemes; in-place mode picker shows all 8 options with the last one scrollable and clickable (previously unreachable); Escape restores focus to the trigger.Clinical Governance Preflight
Not required: this PR changes only the composer "+" menu presentation (one component + its CSS). No ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output paths are touched.
Notes
648abfa3f("docs: align readiness runtime version"), which predates this session; its content is already on main (net file diff vs origin/main is empty), so this PR's effective diff is exactly the two files above.origin/mainwas merged into the branch (clean, no conflicts) before push; the only overlapping file wasglobals.cssin a distant token block.🤖 Generated with Claude Code